﻿// ....................................................................................................................
//	Author: Copyright (C) 2012 Ing. Marek Hubal
//	Email: hubal@acasoftware.org
// ....................................................................................................................

using System;

namespace core
{
    /// <summary>Trieda INodeList_SMB_ITEMS</summary>
    public class INodeList_SMB_ITEMS : INodeList_LOCAL_ITEMS
    {

        /// <summary>Konstruktor</summary>
        public INodeList_SMB_ITEMS(string pExpandPath = "")
            : base(pExpandPath)
        {
        }

        /// <summary>Ziskanie key. hodnoty pre podcestu zlava</summary>
        /// <param name="pDepth">hlbka</param>
        /// <returns>key. hodnota alebo prezdny retazec</returns>
        public override string GetSubKeyValue(int pDepth)
        {
            string P = IFileSystem.ExtractSubpath(CurrentPath, pDepth + 3);
            return P == "" ? "" : IFileSystem.ExtractName(P).ToLower();
        }
        /// <summary>Property: CanTrash</summary>
        public override bool CanTrash
        {
            get
            {
                return false;
            }
        }
        /// <summary>Property: CanTrashItem</summary>
        /// <param name="pIndex">pozicia</param>
        public override bool CanTrashItem(int pIndex)
        {
            return false;
        }

        /// <summary>Vytvorenie klonu zoznamu</summary>
        /// <returns>objekt zoznamu</returns>
        public override INodeList CloneList()
        {
            return new INodeList_SMB_ITEMS(CurrentPath);
        }
    }
}
